@extends('admin.master')
<script src="/js/admin/customers.js"></script>

@section('title', '用户信息')
@section('firstItem')
@parent
				<span>用户信息</span>
				<input class="a_indexbg" type="hidden" value="customers" />
@stop
@section('searchList')
@parent
				<a class="queryBoxBtn">搜索</a>
				<div>
					<input class="writeQueryBox" type="text" placeholder="输入用户姓名或用户手机号码" value="{{ $condition }}" />
				</div>
				<div>设备型号		
					<span class="deviceCheckBox deviceModelBox">{{ $device_type or '全部' }}</span>
					<div class="deviceCheckDropBox deviceModelDropBox">
						<a>全部</a>
						<a>1508</a>
						<a>H5</a>
					</div>
				</div>
@stop
@section('dataTables')
@parent
			<table class="userInfor dataTables" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<td>序号</td>
						<td>用户姓名</td>
						<td>身份证号码</td>
						<td>手机号码</td>
						<td>安装地址</td>
						<td>设备编号</td>
						<td>设备型号</td>
					</tr>
				</thead>
				<tbody>
					@for($i=0, $customerCount = count($customer_list); $i<$customerCount; $i++)
					<tr >
						<td>{{ $i+1 }}</td>
						<td class="deviceUserCell">{{ $customer_list[$i]->name or '' }}</td>
						<td class="IDNum">{{ $customer_list[$i]->id_number or '' }}</td>
						<td class="phoneCell">{{ $customer_list[$i]->phone or '' }}</td>
						<td class="adressCell">{{ $customer_list[$i]->installation_address or '' }}</td>
						<td class="deviceCodeCell devicecodeVal">
							@for($j=0,$deviceCount=count($customer_list[$i]->devices); $j<$deviceCount; $j++)
							<a href="/admin/device/history?device_id={{ $customer_list[$i]->devices[$j]->id}}">{{ $customer_list[$i]->devices[$j]->code or '' }}</a><br/>
							@endfor
						</td>
						<td class="deviceModelCell">
						@for($j=0,$deviceCount=count($customer_list[$i]->devices); $j<$deviceCount; $j++)
						{{ $customer_list[$i]->devices[$j]->deviceType->type or '' }}<br/>
						@endfor
						</td>
					</tr>
					@endfor
				</tbody>
			</table>
@stop
@section('page_num')
<!-- 分页布局 -->
<ul class="pagination pagination-lg"> 
	<?php
	$queryParam = [];
	$queryParam = empty($device_type)? $queryParam: array_merge($queryParam, ['device_type' => $device_type]);
	$queryParam = empty($condition)? $queryParam: array_merge($queryParam, ['condition' => $condition]);?>
	{!! $customer_list->appends($queryParam)->render() !!}
</ul>
@stop
@section('infor_promit')
@parent
	<!-- 编辑 -->
	<div class="bombBoxBg">
		<div class="bombBox" >
			<p class="titleTxt">编辑信息</p>
			<div class="writeBox">
				<p><span>水机用户</span><input class="nameBox" type="text"/><label class="required">*</label></p>
				<p class="sex_p">
					<span>性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别</span>
					<span class="sexInput"></span>
					<span class="sexBox">
						<a>男</a>
						<a>女</a>
					</span>
				</p>
				<div class="clearfloat"></div>
				<p><span>手机号码</span><input class="phoneBox" type="text"  /><label class="required">*</label></p>
				<p><span>安装地址</span><input class="adressBox" type="text"  /><label class="required">*</label></p>
				<p><span>设备编号</span><label class="getDeviceCode"></label></p>
				<p><span>用户名</span><label class="getUserName"></label></p>
				<div class="clearfloat"></div>
				<p><span>经销商</span><label class="getAgency"></label></p>

			</div>
			<label></label>
			<div class="btnBox">
				<a class="callOffBtn">取消</a>
				<a class="confirmBtn">确定</a>
			</div>
		</div>
	</div>
@stop